package com.jy.api.domain;

import com.jy.api.signUpReq.web.WebNoticeSignUpReq;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by lihu on 2018/3/3.
 * 会员消息表
 */
@Slf4j
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Notice {


    @Id
    @Column(length = 50)
    private String id;

    @Column(length = 50)
    private String storeId;


    private boolean states = false;

    /**
     * 座位号
     */
    private String tableNo;


    @Column(insertable = false, updatable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date addTime;

    /**
     * 初始化呼叫
     *
     * @param signUpReq
     */
    public Notice(WebNoticeSignUpReq signUpReq) {
        id = signUpReq.getId();
        storeId = signUpReq.getStoreId();
        tableNo = signUpReq.getTableNo();
    }
}
